/*******************************************************************************
 * Copyright (c) 2010 Sylvain Sicard.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the GNU Lesser Public License v2.1
 * which accompanies this distribution, and is available at
 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * 
 * Contributors:
 *     Sylvain Sicard - initial API and implementation
 ******************************************************************************/
package com.googlecode.ssdutils.beanconverter.test.testcases;

import com.googlecode.ssdutils.beanconverter.api.BeanConverter;
import com.googlecode.ssdutils.beanconverter.test.entities.PeopleA;
import com.googlecode.ssdutils.beanconverter.test.entities.PeopleB;
import com.googlecode.ssdutils.beanconverter.test.entities.PeopleC;


/**
 * @author Sylvain Sicard
 * 
 */
public class ConvertionTestImpl implements ConvertionTest {

	private BeanConverter<PeopleA, PeopleB> converterAtoB;

	private BeanConverter<PeopleB, PeopleC> converterBtoC;

	public void setConverterBtoC(BeanConverter<PeopleB, PeopleC> converterBtoC) {
		this.converterBtoC = converterBtoC;
	}

	public void setConverterAtoB(BeanConverter<PeopleA, PeopleB> converterAtoB) {
		this.converterAtoB = converterAtoB;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * com.googlecode.ssdutils.beanconverter.test.testcases.ConvertionTest#testConverter(com.googlecode.ssdutils.beanconverter.test
	 * .entities.PeopleA)
	 */
	public PeopleB testConverter(PeopleA peopleA) {
		return converterAtoB.convert(peopleA);
	}

	public PeopleC testConverter(PeopleB peopleB) {
		return converterBtoC.convert(peopleB);
	}

}
